﻿<UserControl x:Class="WpfScheduler.WeekScheduler"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="800"
             xmlns:my="clr-namespace:WpfScheduler" Loaded="UserControl_Loaded">

    <!--<Slider Grid.Row="0" Name="_zoom" Minimum="1" Maximum="2" />
    <Grid.LayoutTransform>
                    <ScaleTransform ScaleX="{Binding Path=Value, ElementName=_zoom}" ScaleY="{Binding Path=Value, ElementName=_zoom}" />
                </Grid.LayoutTransform>
    -->
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <my:SchedulerGrid x:Name="EventsHeaderGrid" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="8" Margin="0 0 18 0"
                          ShowCustomGridLines="True" GridLineBrush="#555555" GridLineThickness="0.5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>

            <!--Week days-->
            <Label x:Name="dayLabel1" Grid.Row="0" Grid.Column="1" Content="Mon 27/5"></Label>
            <Label x:Name="dayLabel2" Grid.Row="0" Grid.Column="2" Content="Tue 28/5"></Label>
            <Label x:Name="dayLabel3" Grid.Row="0" Grid.Column="3" Content="Wed 29/5"></Label>
            <Label x:Name="dayLabel4" Grid.Row="0" Grid.Column="4" Content="Thu 30/5"></Label>
            <Label x:Name="dayLabel5" Grid.Row="0" Grid.Column="5" Content="Fri 31/5"></Label>
            <Label x:Name="dayLabel6" Grid.Row="0" Grid.Column="6" Content="Sat 1/6"></Label>
            <Label x:Name="dayLabel7" Grid.Row="0" Grid.Column="7" Content="Sun 2/6"></Label>

            <!-- All day events -->
            <StackPanel x:Name="allDayEvents" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="7"
                        Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            </StackPanel>
            
        </my:SchedulerGrid>


        <Border BorderBrush="#555555" BorderThickness="0.5" Grid.Row="2">
            <ScrollViewer x:Name="ScrollEventsViewer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">

            <my:SchedulerGrid x:Name="EventsGrid"
                              ShowCustomGridLines="True" GridLineBrush="#555555" GridLineThickness="0.5">

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="60"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
        
                <Grid.RowDefinitions>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>

                </Grid.RowDefinitions>

                
                <!-- Hours -->
                <Label Grid.Row="0" Grid.Column="0" Content="12:00 AM"></Label>
                <Label Grid.Row="1" Grid.Column="0" Content="01:00 AM"></Label>
                <Label Grid.Row="2" Grid.Column="0" Content="02:00 AM"></Label>
                <Label Grid.Row="3" Grid.Column="0" Content="03:00 AM"></Label>
                <Label Grid.Row="4" Grid.Column="0" Content="04:00 AM"></Label>
                <Label Grid.Row="5" Grid.Column="0" Content="05:00 AM"></Label>
                <Label Grid.Row="6" Grid.Column="0" Content="06:00 AM"></Label>
                <Label Grid.Row="7" Grid.Column="0" Content="07:00 AM"></Label>
                <Label Grid.Row="8" Grid.Column="0" Content="08:00 AM"></Label>
                <Label Grid.Row="9" Grid.Column="0" Content="09:00 AM"></Label>
                <Label Grid.Row="10" Grid.Column="0" Content="10:00 AM"></Label>
                <Label Grid.Row="11" Grid.Column="0" Content="11:00 AM"></Label>
                <Label Grid.Row="12" Grid.Column="0" Content="12:00 PM"></Label>
                <Label Grid.Row="13" Grid.Column="0" Content="01:00 PM"></Label>
                <Label Grid.Row="14" Grid.Column="0" Content="02:00 PM"></Label>
                <Label Grid.Row="15" Grid.Column="0" Content="03:00 PM"></Label>
                <Label Grid.Row="16" Grid.Column="0" Content="04:00 PM"></Label>
                <Label Grid.Row="17" Grid.Column="0" Content="05:00 PM"></Label>
                <Label Grid.Row="18" Grid.Column="0" Content="06:00 PM"></Label>
                <Label Grid.Row="19" Grid.Column="0" Content="07:00 PM"></Label>
                <Label Grid.Row="20" Grid.Column="0" Content="08:00 PM"></Label>
                <Label Grid.Row="21" Grid.Column="0" Content="09:00 PM"></Label>
                <Label Grid.Row="22" Grid.Column="0" Content="10:00 PM"></Label>
                <Label Grid.Row="23" Grid.Column="0" Content="11:00 PM"></Label>
        
                <!-- Start and end journey -->
                <StackPanel x:Name="startJourney" Opacity="0.5" Background="LightCoral" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="7" Orientation="Horizontal" VerticalAlignment="Stretch"></StackPanel>
                <StackPanel x:Name="endJourney"   Opacity="0.5" Background="LightCoral" Grid.Column="1" Grid.Row="23" Grid.ColumnSpan="7" Orientation="Horizontal" VerticalAlignment="Stretch"></StackPanel>

                <!-- Canvas  -->
                <Canvas x:Name="column1" Grid.Column="1" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Canvas >
                <Canvas x:Name="column2" Grid.Column="2" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Canvas >
                <Canvas x:Name="column3" Grid.Column="3" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Canvas >
                <Canvas x:Name="column4" Grid.Column="4" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Canvas >
                <Canvas x:Name="column5" Grid.Column="5" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Canvas >
                <Canvas x:Name="column6" Grid.Column="6" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Canvas >
                <Canvas  x:Name="column7" Grid.Column="7" Grid.Row="0" Grid.RowSpan="22" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                        

                        <Border Width="100" Height="100" Background="Green" VerticalAlignment="Top" Margin="0 200 0 0">

                        </Border>

                        <Border Width="100" Height="100" Background="Yellow" VerticalAlignment="Top" Margin="0 350 0 0">

                        </Border>

                    </Canvas >

            </my:SchedulerGrid>
        </ScrollViewer>
        </Border>
    </Grid>
</UserControl>
